﻿CREATE PROCEDURE [dbo].[GetTimeEntry]
@EntryLogID INT
AS
SELECT 
    EL.Description, 
    EL.Duration, 
    EL.EntryDate, 
    EL.ProjectID, 
    EL.UserID, 
    EL.CategoryID,
    EL.OvernightStay,
    P.Name AS ProjectName

FROM 
    EntryLog EL
        INNER JOIN Projects P
            ON EL.ProjectID = P.ProjectID
    
WHERE 
    EL.EntryLogID = @EntryLogID

